﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyAdmin/QuanLy.master" AutoEventWireup="true" CodeFile="ChungLoaiSP_AM.aspx.cs" Inherits="MyAdmin_ChungLoaiSP_AM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 231px;
        }
        .style3
        {
            width: 633px;
        }
        .style4
        {
            width: 626px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<fieldset>
       <legend align="center"><b>Tìm Kiếm</b></legend>
        <table border="0" cellspacing="0" cellpadding="0" style="width: 94%">
            <tr>
                <td class="style1" align="right">
                    ID :
                </td>
                <td align ="left">
                    <asp:TextBox ID="txtTK_ID" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style1"align="right">
                    Tên :
                </td>
                <td align ="left">
                    <asp:TextBox ID="txtTK_Ten" runat="server" ></asp:TextBox>
                </td>
            </tr>           
            <tr>
            <td class="style1"></td>
                <td>
                    <asp:Button ID="btnTimKiem_NCCGH" runat="server" Text="Tìm Kiếm" OnClick="btnTimKiem_NCCGH_Click" />
                </td>
            </tr>
        </table>
    </fieldset>
    <fieldset>
        <asp:Label ID="lblTBKhongTimThay" ForeColor="White" runat="server" Visible="false" Text="Không tìm thấy sản phẩm nào!"></asp:Label>
        
        <legend align="center"><b>Quản Lý Chủng Loại SP</b></legend>
         <table>
    <tr>
    <td align="center" class="style4">
        <asp:DetailsView ID="dtChiTietGiangHang" runat="server" Height="50px" Width="50%"
            BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" DataKeyNames="ID" HeaderText="Chi Tiết Chủng Loại SP" AutoGenerateRows="False"
            OnItemInserted="dtChiTietGiangHang_ItemInserted" OnItemUpdated="dtChiTietGiangHang_ItemUpdated"
            Style="margin-left: 0px" DataSourceID="LQDSNCC_GiangHang" 
            GridLines="Vertical" >
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <Fields>
                <asp:BoundField HeaderText="ID" ReadOnly="true" DataField="ID" 
                    InsertVisible="False" SortExpression="ID" />
                <asp:BoundField DataField="Ten" HeaderText="Ten" SortExpression="Ten" />
                <asp:TemplateField HeaderText="Hình">
                    <ItemTemplate>
                        <asp:Label ID="hinhLABEL" runat="Server" Text='<%# Eval("Hinh") %>' />
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:Label ID="lblUpdloadForEdit" runat="server" Text="Upload Hình:" ForeColor="White"></asp:Label>
                        <asp:FileUpload ID="fuForEdit" runat="server" />
                        <asp:Button ID="btnUploadForEdit" runat="server" Text="Upload" OnClick="btnUploadForEdit_Click" />
                        <asp:TextBox ID="txtUploadForEdit" ReadOnly="true" Text='<%# Bind("Hinh") %>' runat="server"></asp:TextBox>
                    </EditItemTemplate>
                </asp:TemplateField>
                <asp:CheckBoxField DataField="DaXoa" HeaderText="DaXoa" 
                    SortExpression="DaXoa" />
                <asp:CommandField ShowEditButton="True" ShowInsertButton="True" 
                    CancelText="Hủy" EditText="Cập Nhật" InsertText="Thêm" NewText="Thêm" 
                    UpdateText="Cập Nhật" />
            </Fields>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" 
                HorizontalAlign="Center" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
        </asp:DetailsView>          
         <asp:Label runat="server" Text="Label" ID="lblThongBaoDTView" ForeColor="White" Visible="false"/>
          </td>
    </tr>
    </table><br />
        <asp:GridView ID="gvDSNCC_GiangHang" runat="server" AllowPaging="True"
            AutoGenerateColumns="False" DataKeyNames="ID" BackColor="White" BorderColor="#999999"
            BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" Width="100%"
            OnSelectedIndexChanged="gvDSNCC_GiangHang_SelectedIndexChanged" 
            onpageindexchanging="gvDSNCC_GiangHang_PageIndexChanging" >
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
            <asp:CommandField ShowSelectButton="True" CancelText="Bỏ qua"
                    DeleteText="Xóa" EditText="Sửa" SelectText="Chọn" />
                    <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                   ReadOnly="True" SortExpression="ID" />
                <asp:ImageField DataImageUrlField="Hinh" ReadOnly="True" HeaderText="Hình Ảnh">
                    <ControlStyle Height="100px" Width="100px" />
                </asp:ImageField>
             
               <asp:BoundField DataField="Ten" HeaderText="Tên " SortExpression="NCC_UN" />
               <asp:BoundField DataField="DaXoa" HeaderText="Đã Xóa" SortExpression="Ten"  />
            
                <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="checkXoa" runat="server" AutoPostBack="True" />
                </ItemTemplate>
                </asp:TemplateField>
            
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <table>
    <tr>
    <td align="right" class="style3">
    <asp:Label ID="lblThongBaoGridView" runat="server" ForeColor="White" Text="Label"/>
        <asp:Button ID="XoaNhieuBUTTON" runat="server" Text="Xóa Đã Chọn" onclick="XoaNhieuBUTTON_Click" />
           </td>
    </tr>
    </table>
        
      
        
        <asp:LinqDataSource ID="LQDSNCC_GiangHang" runat="server" ContextTypeName="DataAccess_Layer.DataClasses_RetailerDataContext"
            EnableDelete="True" EnableInsert="True" EnableUpdate="True" EntityTypeName=""
            TableName="ChungLoaiSPs" OnSelecting="LQDSNCC_GiangHang_Selecting" 
            onupdating="LQDSNCC_GiangHang_Updating" oninserted="LQDSHoaDon_AM_Inserted">
        </asp:LinqDataSource>
        <br />
    </fieldset>
        </table>

</asp:Content>

